package com.lhczf.lucenedb.consumer;

import com.lhczf.lucenedb.util.FileUtil;
import lombok.extern.slf4j.Slf4j;

import java.io.File;
import java.util.List;

/**
 * @author: 刘华春
 * @date: 2019/2/7
 */
@Slf4j
public class CleanData implements Runnable {

    @Override
    public void run() {
        log.info("清理线程已经启动。");
        List<File> fileList = FileUtil.getDellFailFiles();
        fileList.forEach(FileUtil::safeDeleteFile);
    }
}
